//
//  aboutMe.swift
//  DingDongZP
//
//  Created by Zhongnan on 16/4/10.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

import UIKit


class aboutMeVC: LDBaseCustomizeVC {

    var imgLogo:UIImageView?
    var verLab:UILabel?
    
    var line1:UIView?
    var line2:UIView?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        setDefaultContent()
        
    }

    func setDefaultContent() {
        view.backgroundColor = LDBackGoundColorGray
        self.title = "关于我们"
        imgLogo = UIImageView.init()
        imgLogo?.contentMode = UIViewContentMode.ScaleAspectFit
        imgLogo?.image = UIImage.init(named: "aboutme_logoyyy.png")
        

        var versionStr = ""
    
        if isDebug {
            versionStr = "Version " + LDAppVersion + "(测试版)"
        } else {
            versionStr = "Version " + LDAppVersion
        }
        
        verLab = UILabel.setDetailsLab(versionStr, fontSize: 13, titleColor: LDFontColor.DeepGray, Alignment: .Center)
        verLab?.userInteractionEnabled = true


        line1 = UIView.init()
        line1?.backgroundColor = LDIconColor.LightGray
        line2 = UIView.init()
        line2?.backgroundColor = LDIconColor.LightGray
        
        view.addSubview(imgLogo!)
        view.addSubview(verLab!)
        view.addSubview(line1!)
        view.addSubview(line2!)
        
        imgLogo?.snp_makeConstraints(closure: { (make) in
            make.top.equalTo(80)
            make.centerX.equalTo(self.view)
            make.size.equalTo(CGSizeMake(240, 240))
        })
        verLab?.snp_makeConstraints(closure: { (make) in
            make.top.equalTo((imgLogo?.snp_bottom)!).offset(60)
            make.centerX.equalTo(imgLogo!)
            make.height.equalTo(20)
        })
        line1?.snp_makeConstraints(closure: { (make) in
            make.centerY.equalTo(verLab!)
            make.right.equalTo((verLab?.snp_left)!).offset(-20)
            make.size.equalTo(CGSizeMake(60, 1))
        })
        line2?.snp_makeConstraints(closure: { (make) in
            make.centerY.equalTo(verLab!)
            make.left.equalTo((verLab?.snp_right)!).offset(20)
            make.size.equalTo(line1!)
        })
        
    }

}
